package com.ehcache.lc.server.service.impl;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.Caching;
import org.springframework.stereotype.Service;

import com.ehcache.lc.server.service.EhCacheTestService;

@Service
public class EhCacheTestServiceImpl implements EhCacheTestService {
	
//	@Caching
//	@CachePut(value="cacheTest",key="#param")
	@Cacheable(value="cacheTest",key="#param")
	public String getTimestamp(String param) {
		Long timestamp = System.currentTimeMillis();
		return timestamp.toString();
	}
	@CacheEvict(value="cacheTest",key="#param")
	public void deletTimestamp(String param){
	}
	
	
	public String updateTimestamp(){
		return null;
	}

}
